#!/bin/bash
echo "Please choose you do!"
echo "1.Open GUI view!"
echo "2.Close GUI view!"
echo "3.Always use GUI!"
echo "4.Always close GUI!"
read -p "Choose Number:" number
case "$number" in 
 "1")
  echo "Open GUI now..."
  init 5
 ;;
 "2")
  echo "Close GUI now..."
  init 3
 ;;
 "3")
  systemctl set-default graphical.target
  init 5
 ;;
 "4")
  systemctl set-default multi-user.target
  init 3
 ;;
 *)
  echo "No "$number" cmd!"
 ;;
esac
ping localhost -c 3 >ping.out
rm -f ping.out
exit
